\(\int \frac {(1+x)^n}{\sqrt {1-x}} \, dx\) [1886]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [C] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 15, antiderivative size = 35 \[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=-2^{1+n} \sqrt {1-x} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-n,\frac {3}{2},\frac {1-x}{2}\right ) \]

[Out]

-2^(1+n)*hypergeom([1/2, -n],[3/2],1/2-1/2*x)*(1-x)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {71} \[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=-2^{n+1} \sqrt {1-x} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-n,\frac {3}{2},\frac {1-x}{2}\right ) \]

[In]

Int[(1 + x)^n/Sqrt[1 - x],x]

[Out]

-(2^(1 + n)*Sqrt[1 - x]*Hypergeometric2F1[1/2, -n, 3/2, (1 - x)/2])

Rule 71

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c
 - a*d))^n))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-d/(b*c - a*d), 0]))

Rubi steps \begin{align*} \text {integral}& = -2^{1+n} \sqrt {1-x} \, _2F_1\left (\frac {1}{2},-n;\frac {3}{2};\frac {1-x}{2}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00 \[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=-2^{1+n} \sqrt {1-x} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-n,\frac {3}{2},\frac {1-x}{2}\right ) \]

[In]

Integrate[(1 + x)^n/Sqrt[1 - x],x]

[Out]

-(2^(1 + n)*Sqrt[1 - x]*Hypergeometric2F1[1/2, -n, 3/2, (1 - x)/2])

Maple [F]

\[\int \frac {\left (1+x \right )^{n}}{\sqrt {1-x}}d x\]

[In]

int((1+x)^n/(1-x)^(1/2),x)

[Out]

int((1+x)^n/(1-x)^(1/2),x)

Fricas [F]

\[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=\int { \frac {{\left (x + 1\right )}^{n}}{\sqrt {-x + 1}} \,d x } \]

[In]

integrate((1+x)^n/(1-x)^(1/2),x, algorithm="fricas")

[Out]

integral(-(x + 1)^n*sqrt(-x + 1)/(x - 1), x)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.16 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.89 \[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=- 2 \cdot 2^{n} i \sqrt {x - 1} {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, - n \\ \frac {3}{2} \end {matrix}\middle | {\frac {\left (x - 1\right ) e^{i \pi }}{2}} \right )} \]

[In]

integrate((1+x)**n/(1-x)**(1/2),x)

[Out]

-2*2**n*I*sqrt(x - 1)*hyper((1/2, -n), (3/2,), (x - 1)*exp_polar(I*pi)/2)

Maxima [F]

\[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=\int { \frac {{\left (x + 1\right )}^{n}}{\sqrt {-x + 1}} \,d x } \]

[In]

integrate((1+x)^n/(1-x)^(1/2),x, algorithm="maxima")

[Out]

integrate((x + 1)^n/sqrt(-x + 1), x)

Giac [F]

\[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=\int { \frac {{\left (x + 1\right )}^{n}}{\sqrt {-x + 1}} \,d x } \]

[In]

integrate((1+x)^n/(1-x)^(1/2),x, algorithm="giac")

[Out]

integrate((x + 1)^n/sqrt(-x + 1), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {(1+x)^n}{\sqrt {1-x}} \, dx=\int \frac {{\left (x+1\right )}^n}{\sqrt {1-x}} \,d x \]

[In]

int((x + 1)^n/(1 - x)^(1/2),x)

[Out]

int((x + 1)^n/(1 - x)^(1/2), x)